import time

from page import JsGdPageHome


# 医生端固定正畸
class JsGdHandle(JsGdPageHome):
    def click_menu_js_gd(self):  # 技师点击固定正畸
        self.get_menu_js_gd_ele().click()

    def click_search1_js(self):  # 技师点击病例筛选
        self.get_search1_js_ele().click()

    def click_search2_js(self):  # 技师选择要筛选的病例“技师待接收”状态
        self.get_search2_js_ele().click()

    def click_search_js_button(self):  # 技师点击查询按钮
        self.get_search_js_button_ele().click()

    def click_receive_js(self):  # 技师点击接收按钮
        self.get_receive_js_ele().click()

    def click_receive_js_button(self):  # 技师点击确认接收
        self.get_receive_js_button_ele().click()
        time.sleep(40)

    def click_details(self):  # 技师点击详情页面
        self.get_details_ele().click()

    def click_see_model_ele(self):  # 技师在详情页面点击查看
        self.get_see_model_ele().click()

    def text_see_model_success(self):  # 校验验模加载成功
        self.get_see_model_success_ele()
        time.sleep(1)

    def click_see_model_close(self):  # 关闭模型页面
        self.get_see_model_close_ele().click()

    # 进入设计工具---------------------------------
    def click_design_ele(self):  # 点击方案设计
        self.get_design_ele().click()

    def click_okbtn_ele(self):  # 确认进入设计工具
        self.get_okbtn_ele().click()

    def text_success_next_ele(self):  # 校验加载完成到没到0%
        time.sleep(1)
        self.get_success_next_ele()
        time.sleep(1)


    def click_next_fenya_ele1(self):  # 分牙页面点击下一步
        time.sleep(1)
        self.get_next_fenya_ele1().click()
        time.sleep(1)


    def click_get_over_ele(self):  # 分牙结束点击完成
        self.get_over_ele().click()

    # 进入排牙
    def click_ai_ele(self):  # 点自动排牙
        self.get_ai_ele().click()

    def click_ba_ele(self):  # 拔牙
        self.get_ba_ele().click()

    def click_ba_ok_ele(self):  # 确定拔牙
        self.get_ba_ok_ele().click()

    def click_collision_ele(self):  # 咬合
        self.get_collision_ele().click()

    def click_occlusion_ele(self):  # 碰撞
        self.get_occlusion_ele().click()

    def click_row_teeth_next_ele(self):  # 进入托槽
        self.get_row_teeth_next_ele().click()

    # 进入托槽
    def click_bracket_ele(self):  # 托槽数据库
        self.get_bracket_ele().click()

    def click_pt_ele1(self):  # 选择托槽
        self.get_pt_ele1().click()

    def click_pt_ele2(self):  # 确认所选托槽
        self.get_pt_ele2().click()

    def click_leveling_ele(self):  # 点击整平
        self.get_leveling_ele().click()

    def click_no_gap_ele(self):  # 点击托槽无间隙
        self.get_no_gap_ele().click()

    def click_bracket_next_ele(self):  # 点击下一步进入报告
        self.get_bracket_next_ele().click()
        time.sleep(2)

    # 报告
    def click_sumbit1_ele(self):  # 提交方案
        self.get_sumbit1_ele().click()

    def click_sumbit2_ele(self):  # 确认提交
        self.get_sumbit2_ele().click()

    def text_sumbit3_ele(self):  # 校验提交成功
        self.get_sumbit3_ele()
        time.sleep(1)

    # 进入导板
    def send_input_search_js_ele(self, case_no):
        self.get_input_search_js_ele().clear()
        self.get_input_search_js_ele().send_keys(case_no)

    def click_guide_plate_design_ele(self):  # 点击导板设计
        self.get_guide_plate_design_ele().click()

    def click_edit1_group_ele(self):  # 点击分组
        self.get_edit1_group_ele().click()

    def click_edit2_group_ele(self):  # 点击整平
        self.get_edit2_group_ele().click()

    def click_edit3_group_ele(self):  # 点击生成导板
        self.get_edit3_group_ele().click()
